public class SimpleFactory {
    public Shape createShape(String type) {
        Shape shape;
        switch (type) {
            case "circle":
                shape = new CircleShape();
                break;
            case "square":
                shape = new Square();
                break;
            default:
                shape = new Rectangle();
                break;
        }

        return shape;
    }
}
